package com.ugoodtech.mdcc.core.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.util.Date;

@ApiModel("报告问卷")
@Entity
@Table(name = "station_report_temp")
public class StationReportTemp extends BaseEntity {

    @ApiModelProperty("创建报告人")
    private User user;

    @ApiModelProperty("维修站")
    private Station station;

    @ApiModelProperty("报告状态,unfinshed:暂存")
    private String reportType;

    @ApiModelProperty("部门待确认状态")
    private String specifiedType;

    @ApiModelProperty("负责人待处理状态")
    private String exceptionType;

    @ApiModelProperty("被指定人的IDs")
    private String userIds;

    @ApiModelProperty("报告的类型")
    private String reportCategory;

    @ApiModelProperty("服务开始时间")
    private Date startServiceTime;

    @ApiModelProperty("服务结束时间")
    private Date endServiceTime;

    @ApiModelProperty("当前暂存的章节ID")
    private Long sectionId;

    @ApiModelProperty("锚点")
    private String anchor;

    @ApiModelProperty("补充信息的维修站ID")
    private Long temporaryStationId;

    @ApiModelProperty("多选的服务项目")
    private String answerOther;

    @ApiModelProperty("提交者的类型")
    private Integer userType;


    @ManyToOne
    @JoinColumn(name = "user_id")
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @ManyToOne
    @JoinColumn(name = "station_id")
    public Station getStation() {
        return station;
    }

    public void setStation(Station station) {
        this.station = station;
    }

    @Column(name = "report_type")
    public String getReportType() {
        return reportType;
    }

    public void setReportType(String reportType) {
        this.reportType = reportType;
    }

    @Column(name = "specified_type")
    public String getSpecifiedType() {
        return specifiedType;
    }

    public void setSpecifiedType(String specifiedType) {
        this.specifiedType = specifiedType;
    }

    @Column(name = "exception_type")
    public String getExceptionType() {
        return exceptionType;
    }

    public void setExceptionType(String exceptionType) {
        this.exceptionType = exceptionType;
    }

    @Column(name = "user_ids")
    public String getUserIds() {
        return userIds;
    }

    public void setUserIds(String userIds) {
        this.userIds = userIds;
    }

    @Column(name = "report_category")
    public String getReportCategory() {
        return reportCategory;
    }

    public void setReportCategory(String reportCategory) {
        this.reportCategory = reportCategory;
    }

    public enum QuestionPaperCategory {
        colorReport, leanPaintReport, serviceReport, saleServiceReport, satisfactionReport
    }

    public Date getStartServiceTime() {
        return startServiceTime;
    }

    public void setStartServiceTime(Date startServiceTime) {
        this.startServiceTime = startServiceTime;
    }

    public Date getEndServiceTime() {
        return endServiceTime;
    }

    public void setEndServiceTime(Date endServiceTime) {
        this.endServiceTime = endServiceTime;
    }

    @Column(name = "section_id")
    public Long getSectionId() {
        return sectionId;
    }

    public void setSectionId(Long sectionId) {
        this.sectionId = sectionId;
    }

    @Column(name = "anchor")
    public String getAnchor() {
        return anchor;
    }

    public void setAnchor(String anchor) {
        this.anchor = anchor;
    }

    @Column(name = "temporary_station_id")
    public Long getTemporaryStationId() {
        return temporaryStationId;
    }

    public void setTemporaryStationId(Long temporaryStationId) {
        this.temporaryStationId = temporaryStationId;
    }

    @Column(name = "answer_other")
    public String getAnswerOther() {
        return answerOther;
    }

    public void setAnswerOther(String answerOther) {
        this.answerOther = answerOther;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }
}
